/**
 * @description 小工具
 * @returns
 */

export const useUtils = () => {
  const { pathname } = location;
  // 是否是通讯调度屏
  const isCommPanel =
    pathname.includes('communicateCenter') || pathname.includes('communicationCenter');

  // 是否是地图屏
  const isMapPanel =
    pathname.includes('mapCenter') ||
    pathname.includes('policeTask') ||
    pathname.includes('mapCommand') ||
    pathname.includes('planSpecial');

  // 是否是勤务屏
  const isAdmin = pathname.includes('policeAdmin');

  return { isCommPanel, isMapPanel, isAdmin };
};
